<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <body>

        <ui:composition template="./WEB-INF/templates/maintemplate.xhtml">

            <ui:define name="content">
                <h1 id="hlunch">Á la carte</h1>
                <hr></hr>
                
                  <h:form class="form">
                     <h:selectOneMenu value="#{viewMenu.fineMenuId}">  
                        <f:selectItem itemLabel="välj meny"></f:selectItem>
                        <f:selectItems value="#{viewMenu.menuList}" var="f"  itemValue="#{f.fineMenuId}" itemLabel="#{f.fineMenuName}"/> 
                </h:selectOneMenu> <br/>
                    
                <h:commandButton value="välj" action="#{viewMenu.prepareMenu()}"> </h:commandButton> <br/><br/>
                </h:form>
                
                <h1>   <h:outputText value="#{menuView.fineMenuName}"></h:outputText><br/>
                        Varmrätter <br/>
                
                </h1>
                     
                  <ui:repeat var="o" value="#{viewMenu.mainCourse}" varStatus="status">
 
                    
                    <br/><h:outputText class ="dinnerName" value="#{o.dinnerName}"></h:outputText><br/>
                    <h:outputText value="#{o.dinnerDescription}"></h:outputText><br/>
                  Pris <h:outputText value="#{o.dinnerPrice}"></h:outputText> kr<br/><br/>
                    
 
                 </ui:repeat>
                  
                                            
                      <h1><br/>
                        Förrätter <br/><br/></h1>  
                        <ui:repeat var="o" value="#{viewMenu.apetizer}" varStatus="status">
 
                    
                    <h:outputText class ="dinnerName" value="#{o.dinnerName}"></h:outputText><br/>
                    <h:outputText value="#{o.dinnerDescription}"></h:outputText><br/>
                  Pris <h:outputText value="#{o.dinnerPrice}"></h:outputText> kr<br/>
                    
 
                 </ui:repeat>
                
                    
                  <h1><br/>
                  Efterrätter <br/><br/></h1>  
                          <ui:repeat var="o" value="#{viewMenu.dessert}" varStatus="status">
 
                    
                    <h:outputText class ="dinnerName" value="#{o.dinnerName}"></h:outputText><br/>
                    <h:outputText value="#{o.dinnerDescription}"></h:outputText><br/>
                  Pris <h:outputText value="#{o.dinnerPrice}"></h:outputText> kr<br/>
                    
 
                 </ui:repeat>
            </ui:define>

        </ui:composition>

    </body>
</html>
